package com.ruoyi.dr.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.dr.mapper.DrHomeMapper;
import com.ruoyi.dr.domain.DrHome;
import com.ruoyi.dr.service.IDrHomeService;

/**
 * 达人主页 /square_pc_api/homePage/author/profileService业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-12
 */
@Service
public class DrHomeServiceImpl implements IDrHomeService 
{
    @Autowired
    private DrHomeMapper drHomeMapper;

    /**
     * 查询达人主页 /square_pc_api/homePage/author/profile
     * 
     * @param uid 达人主页 /square_pc_api/homePage/author/profile主键
     * @return 达人主页 /square_pc_api/homePage/author/profile
     */
    @Override
    public DrHome selectDrHomeByUid(String uid)
    {
        return drHomeMapper.selectDrHomeByUid(uid);
    }

    /**
     * 查询达人主页 /square_pc_api/homePage/author/profile列表
     * 
     * @param drHome 达人主页 /square_pc_api/homePage/author/profile
     * @return 达人主页 /square_pc_api/homePage/author/profile
     */
    @Override
    public List<DrHome> selectDrHomeList(DrHome drHome)
    {
        return drHomeMapper.selectDrHomeList(drHome);
    }

    /**
     * 新增达人主页 /square_pc_api/homePage/author/profile
     * 
     * @param drHome 达人主页 /square_pc_api/homePage/author/profile
     * @return 结果
     */
    @Override
    public int insertDrHome(DrHome drHome)
    {
        return drHomeMapper.insertDrHome(drHome);
    }

    /**
     * 修改达人主页 /square_pc_api/homePage/author/profile
     * 
     * @param drHome 达人主页 /square_pc_api/homePage/author/profile
     * @return 结果
     */
    @Override
    public int updateDrHome(DrHome drHome)
    {
        return drHomeMapper.updateDrHome(drHome);
    }

    /**
     * 批量删除达人主页 /square_pc_api/homePage/author/profile
     * 
     * @param uids 需要删除的达人主页 /square_pc_api/homePage/author/profile主键
     * @return 结果
     */
    @Override
    public int deleteDrHomeByUids(String[] uids)
    {
        return drHomeMapper.deleteDrHomeByUids(uids);
    }

    /**
     * 删除达人主页 /square_pc_api/homePage/author/profile信息
     * 
     * @param uid 达人主页 /square_pc_api/homePage/author/profile主键
     * @return 结果
     */
    @Override
    public int deleteDrHomeByUid(String uid)
    {
        return drHomeMapper.deleteDrHomeByUid(uid);
    }
}
